package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import protobuf.E_TABLE_TYPE;
	import protobuf.TABLE_LIVE_INFO;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class MSPKG_ENTER_TABLE_ACK extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const TABLE_ID:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.MSPKG_ENTER_TABLE_ACK.table_id", "tableId", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		public var tableId:UInt64;

		/**
		 *  @private
		 */
		public static const ERROR_CODE:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.MSPKG_ENTER_TABLE_ACK.error_code", "errorCode", (2 << 3) | com.netease.protobuf.WireType.VARINT);

		public var errorCode:uint;

		/**
		 *  @private
		 */
		public static const LIVE_INFO:FieldDescriptor$TYPE_MESSAGE = new FieldDescriptor$TYPE_MESSAGE("protobuf.MSPKG_ENTER_TABLE_ACK.live_info", "liveInfo", (3 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED, protobuf.TABLE_LIVE_INFO);

		private var live_info$field:protobuf.TABLE_LIVE_INFO;

		public function clearLiveInfo():void {
			live_info$field = null;
		}

		public function get hasLiveInfo():Boolean {
			return live_info$field != null;
		}

		public function set liveInfo(value:protobuf.TABLE_LIVE_INFO):void {
			live_info$field = value;
		}

		public function get liveInfo():protobuf.TABLE_LIVE_INFO {
			return live_info$field;
		}

		/**
		 *  @private
		 */
		public static const TABLE_TYPE:FieldDescriptor$TYPE_ENUM = new FieldDescriptor$TYPE_ENUM("protobuf.MSPKG_ENTER_TABLE_ACK.table_type", "tableType", (4 << 3) | com.netease.protobuf.WireType.VARINT, protobuf.E_TABLE_TYPE);

		private var table_type$field:int;

		private var hasField$0:uint = 0;

		public function clearTableType():void {
			hasField$0 &= 0xfffffffe;
			table_type$field = new int();
		}

		public function get hasTableType():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set tableType(value:int):void {
			hasField$0 |= 0x1;
			table_type$field = value;
		}

		public function get tableType():int {
			return table_type$field;
		}

		/**
		 *  @private
		 */
		public static const TOURNMENT_ID:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.MSPKG_ENTER_TABLE_ACK.tournment_id", "tournmentId", (5 << 3) | com.netease.protobuf.WireType.VARINT);

		private var tournment_id$field:UInt64;

		public function clearTournmentId():void {
			tournment_id$field = null;
		}

		public function get hasTournmentId():Boolean {
			return tournment_id$field != null;
		}

		public function set tournmentId(value:UInt64):void {
			tournment_id$field = value;
		}

		public function get tournmentId():UInt64 {
			return tournment_id$field;
		}

		/**
		 *  @private
		 */
		public static const TOURNAMENT_TYPE:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.MSPKG_ENTER_TABLE_ACK.tournament_type", "tournamentType", (6 << 3) | com.netease.protobuf.WireType.VARINT);

		private var tournament_type$field:uint;

		public function clearTournamentType():void {
			hasField$0 &= 0xfffffffd;
			tournament_type$field = new uint();
		}

		public function get hasTournamentType():Boolean {
			return (hasField$0 & 0x2) != 0;
		}

		public function set tournamentType(value:uint):void {
			hasField$0 |= 0x2;
			tournament_type$field = value;
		}

		public function get tournamentType():uint {
			return tournament_type$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, this.tableId);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.errorCode);
			if (hasLiveInfo) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_MESSAGE(output, live_info$field);
			}
			if (hasTableType) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_ENUM(output, table_type$field);
			}
			if (hasTournmentId) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 5);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, tournment_id$field);
			}
			if (hasTournamentType) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 6);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, tournament_type$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var table_id$count:uint = 0;
			var error_code$count:uint = 0;
			var live_info$count:uint = 0;
			var table_type$count:uint = 0;
			var tournment_id$count:uint = 0;
			var tournament_type$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (table_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_ENTER_TABLE_ACK.tableId cannot be set twice.');
					}
					++table_id$count;
					this.tableId = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				case 2:
					if (error_code$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_ENTER_TABLE_ACK.errorCode cannot be set twice.');
					}
					++error_code$count;
					this.errorCode = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 3:
					if (live_info$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_ENTER_TABLE_ACK.liveInfo cannot be set twice.');
					}
					++live_info$count;
					this.liveInfo = new protobuf.TABLE_LIVE_INFO();
					com.netease.protobuf.ReadUtils.read$TYPE_MESSAGE(input, this.liveInfo);
					break;
				case 4:
					if (table_type$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_ENTER_TABLE_ACK.tableType cannot be set twice.');
					}
					++table_type$count;
					this.tableType = com.netease.protobuf.ReadUtils.read$TYPE_ENUM(input);
					break;
				case 5:
					if (tournment_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_ENTER_TABLE_ACK.tournmentId cannot be set twice.');
					}
					++tournment_id$count;
					this.tournmentId = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				case 6:
					if (tournament_type$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_ENTER_TABLE_ACK.tournamentType cannot be set twice.');
					}
					++tournament_type$count;
					this.tournamentType = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
